/**
 * Project Name:clps.sms
 * File Name:AccontServiceImpl.java
 * Package Name:com.clps.dev.sms.sm.service.impl
 * Copyright (c) 2018, erwin.wang@clpsglobal.com All Rights Reserved.
 *
 */
package com.clps.dev.sms.sm.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.clps.dev.sms.common.CommonData;
import com.clps.dev.sms.sm.dao.AccountDAO;
import com.clps.dev.sms.sm.dao.impl.AccountDAOImpl;
import com.clps.dev.sms.sm.pojo.Account;
import com.clps.dev.sms.sm.service.IAccountService;
import com.clps.dev.sms.sm.vo.AccountVO;
import com.clps.dev.sms.util.factory.ToolFactory;

/**
 * ClassName: AccontServiceImpl <br/>
 * Description: 
 *
 * @author erwin.wang
 * @version V1.0
 * @since JDK 1.8
 * @2018年10月31日 下午1:57:23
 */
public class AccontServiceImpl implements IAccountService {

	private AccountDAO accountDao;
	private String result;
	private List<AccountVO> accoutVoList = null;
	

	/**
	 * 
	 */
	public AccontServiceImpl() {
		this.accountDao = new AccountDAOImpl();
		this.result = "";
		this.accoutVoList = new ArrayList<>();	
	}

	/**
	 * @see com.clps.dev.sms.sm.service.IAccountService#addAccount(com.clps.dev.sms.sm.pojo.Account)
	 */
	@Override
	public String addAccount(Account account) {
		ToolFactory.getInstanceOfDateTool().dateToString();
		
		if(null!= account){
			if(this.accountDao.saveAccount(account)){
				return CommonData.SAVE_SUCCESS;
			}else{
				return CommonData.SAVE_FAILURE;
			}
		}
		return "";
	}

	/**
	 * TODO 简单描述该方法的实现功能（可选）.
	 * @see com.clps.dev.sms.sm.service.IAccountService#queryAllAccounts()
	 */
	@Override
	public List<AccountVO> queryAllAccounts() {
		this.accountDao.queryAllAccounts();
		return null;
	}
	
	public String updateAccount(){
		return "";
	}

	public String deleteAccount(){
		return "";
	}


}
